feat(everything): add tool annotations to all tools#3891
feat(everything): add tool annotations to all tools#3891m1lestones wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Add ToolAnnotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to all 17 tools in the everything server, consistent with the pattern established in the git, time, and sequential-thinking servers. Annotation rationale: - Read-only tools (echo, get-sum, get-env, get-tiny-image, get-annotated-message, get-resource-links, get-resource-reference, get-structured-content, trigger-long-running-operation): readOnlyHint=true, idempotentHint=true, openWorldHint=false - get-roots-list: readOnlyHint=true, idempotentHint=false (roots can change between calls) - gzip-file-as-resource: openWorldHint=true (fetches from network), readOnlyHint=false (registers a session resource) - toggle-simulated-logging, toggle-subscriber-updates: readOnlyHint=false, idempotentHint=false (stateful toggles) - trigger-sampling-request, trigger-sampling-request-async: openWorldHint=true (invokes LLM inference via client) - trigger-elicitation-request, trigger-elicitation-request-async: readOnlyHint=false, idempotentHint=false (user interaction) All 95 existing tests pass unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude review |
|
Claude finished @cliffhall's task in 2m 28s —— View job PR Review: feat(everything): add tool annotations to all tools
Overall: ✅ Looks good — well-reasoned, complete coverage, consistent with the pattern in other servers. This is a clean, focused PR. All 17 registered tools receive explicit annotations, the rationale table in the PR description is sound, and it correctly excludes Minor observations1.
annotations: {
readOnlyHint: true,
destructiveHint: false,
idempotentHint: false, // ← in tension with readOnlyHint: true
openWorldHint: false,
},Per the MCP spec, a The most internally consistent choice would be either:
The PR's current choice is defensible ("each invocation runs its own independent operation"), but the combination is worth documenting or reconsidering for clarity in a reference server. 2.
The tool accepts both external HTTP/HTTPS URLs and 3. All tools with This is intentional and appropriate. Even though 4.
SummaryThe annotation choices are accurate and well-considered. The only substantive point worth discussing before merge is #1 ( |
The tool sends progress notifications as side effects, so readOnlyHint should be false. readOnly + non-idempotent was semantically inconsistent per the MCP spec.
|
Good catch on Changed All 95 tests still passing. |
Summary
Adds
ToolAnnotations(readOnlyHint,destructiveHint,idempotentHint,openWorldHint) to all 17 tools in theeverythingserver, consistent with the pattern already established in thegit(#3545),time(#3581), andsequential-thinking(#3534) servers.The
everythingserver is designed to showcase all MCP protocol capabilities — ToolAnnotations are a core protocol feature and their absence here was an oversight.Annotation rationale
echoget-sumget-envget-tiny-imageget-annotated-messageget-resource-linksget-resource-referenceget-roots-listget-structured-contentgzip-file-as-resourcetoggle-simulated-loggingtoggle-subscriber-updatestrigger-long-running-operationtrigger-sampling-requesttrigger-elicitation-requesttrigger-sampling-request-asynctrigger-elicitation-request-asyncNotes:
get-roots-listusesidempotentHint: falsebecause the roots list can change between calls as the client updates its workspacegzip-file-as-resourceand the sampling tools useopenWorldHint: truebecause they fetch from external URLs or invoke LLM inferencesimulate-research-queryusesregisterToolTask(experimental tasks API) which has a different config shape — not modified hereTest plan
npx tsc --noEmit— no type errorsnpx vitest run— all 95 tests pass unchanged